/*
 * @Description:
 * @Author: dh
 * @Date: 2021-08-19 17:20:34
 * @LastEditors: dh
 * @LastEditTime: 2022-07-18 14:11:16
 */
import { ref, onMounted } from 'vue'

export default function useTime() {
	const time = ref<Date | null>(null)

	onMounted(() => {
		setInterval(() => {
			time.value = new Date()
		}, 1000)
	})

	return {
		time,
	}
}
